/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gcs.Dados;


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Samuel
 */
public class ConnDB {

    Connection con;
    public ConnDB(){
        try {
            Class.forName("com.mysql.jdbc.Driver");
            con=DriverManager.getConnection("jdbc:mysql://localhost:3306/DSS_DB","root","");

	}
	catch (ClassNotFoundException e) {
		System.out.println("Erro! "+e.getMessage());
	}
	catch (SQLException e) {
		System.out.println("Erro! "+e.getMessage());
	}

    }

    public Connection Connect(){
        return con;
    }

    public void DisconnectDB() throws SQLException{
        con.close();
    }


}
